import QtQuick
import QtQuick.Controls

Rectangle {
    color: "lightgray"

    Column {
        anchors.fill: parent
        spacing: 10

        Row {
            spacing: 10
            anchors.horizontalCenter: parent.horizontalCenter

            Button {
                text: "页面1"
                onClicked: loader.source = "component/Page1.qml"
            }

            Button {
                text: "页面2"
                onClicked: loader.source = "component/Page2.qml"
            }

            Button {
                text: "页面3"
                onClicked: loader.source = "component/Page3.qml"
            }
        }

        Loader {
            id: loader
            width: parent.width
            height: parent.height - 50
            anchors.margins: 10
        }
    }
}
